package main.com.cyz.Recursion;

/**
 * @author fox
 * @version 1.0
 * @description 求阶乘
 * @date 2024/5/17 10:15
 */
public class Factorial {

    public static int math(int num){
        if (num == 1){
            return 1;
        }
        return num * math(num - 1);
    }

}
